<!DOCTYPE html>
<HTML>
<HEAD><meta name="viewport" content="width=device-width, initial-scale=1">
<Title>MeterPointer.setShapeAndOffset2</Title>
<link type='text/css' rel='Stylesheet' href="maxchartapi.css" />
</HEAD>
<body bgcolor="#FFFFFF" text="#000000" topmargin="0" leftmargin="0" rightmargin="0" marginwidth="0" marginheight="0">

<p class="heading0">ChartDirector 7.0 (Java Edition)</p>
<p class="heading1"><a href="MeterPointer.htm">MeterPointer</a>.<wbr>setShapeAndOffset2</p>
<hr class="separator">
<p class="heading2a">Usage</p>
<div class="content">
public void setShapeAndOffset2(int[] pointerCoor [, double startOffset [, double endOffset [, double widthRatio ]]])
</div>
<p class="heading2">Description</p>
<div class="content">
Sets the shape of new style angular meter pointers to a custom polygon.<br><br>
The custom polygon is specified as a list of numbers representing the (x, y) coordinates of the polygon vertices, with the x-axis pointing from left to right and the y-axis pointing from bottom to top. The direction of the pointer should be pointing upwards, with the starting point at y = 0, and the ending point at y = 1000.<br><br>
As an example, the coordinates of the new style triangular pointer are:<br><br>
<div class="indentedblock"><code>-15, 0, 15, 0, 0, 1000, 1000</code></div><br>
The coordinates for the new style line pointer are:<br><br>
<div class="indentedblock"><code>-5, 0, 5, 0, 5, 1000, -5, 1000</code></div><br>
In actual usage, ChartDirector will rotate the polygon to point it to the desired value, and adjust the polygon size and position based on the <b>startOffset</b>, <b>endOffset</b> and <b>widthRatio</b> arguments. Please refer to <a href="MeterPointer.setShapeAndOffset2.htm">MeterPointer.setShapeAndOffset2</a> for the meaning of these arguments.
</div>
<p class="heading2">Arguments</p>
<div class="content">
<div style="width:100%;box-sizing:border-box;">
<table border="1" cellpadding="5" cellspacing="0" width="100%"> 
<tr>
<th width="19%">Argument</th><th width="19%">Default</th><th>Description</th>
</tr>
<tr>
<td>pointerCoor</td><td>(Mandatory)</td><td>An array of numbers x0, y0, x1, y1, x2, y2, ..., representing the coordinates the polygon vertices.</td></tr><tr><td>startOffset</td><td><a href="Chart.NoValue.htm">NoValue</a></td><td>The position of the starting point as a ratio to the scale radius. NoValue means the position is automatically determined.</td></tr><tr><td>endOffset</td><td><a href="Chart.NoValue.htm">NoValue</a></td><td>The position of the ending point as a ratio to the scale radius. NoValue means the position is automatically determined.</td></tr><tr><td>widthRatio</td><td><a href="Chart.NoValue.htm">NoValue</a></td><td>The width of the pointer relative to the default width. NoValue means the width is automatically determined.</td>
</tr>
</table>
</div>
</div>
<p class="heading2">Return Value</p>
<div class="content">
None
</div>
<br><hr class="separator">
<div class="copyright">&copy; 2022 Advanced Software Engineering Limited. All rights reserved.</div>
</body>
</HTML>
